/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.dp.vo;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author wyr
 */
@Entity
@Table(name = "song_ringtones")
//@NamedQueries({@NamedQuery(name = "SongRingtones.findAll", query = "SELECT s FROM SongRingtones s"), @NamedQuery(name = "SongRingtones.findByRingtoneId", query = "SELECT s FROM SongRingtones s WHERE s.ringtoneId = :ringtoneId"), @NamedQuery(name = "SongRingtones.findByName", query = "SELECT s FROM SongRingtones s WHERE s.name = :name"), @NamedQuery(name = "SongRingtones.findByIsrc", query = "SELECT s FROM SongRingtones s WHERE s.isrc = :isrc"), @NamedQuery(name = "SongRingtones.findByDateReceived", query = "SELECT s FROM SongRingtones s WHERE s.dateReceived = :dateReceived"), @NamedQuery(name = "SongRingtones.findByDuration", query = "SELECT s FROM SongRingtones s WHERE s.duration = :duration"), @NamedQuery(name = "SongRingtones.findByCopyright", query = "SELECT s FROM SongRingtones s WHERE s.copyright = :copyright"), @NamedQuery(name = "SongRingtones.findBySellable", query = "SELECT s FROM SongRingtones s WHERE s.sellable = :sellable"), @NamedQuery(name = "SongRingtones.findByDateSellable", query = "SELECT s FROM SongRingtones s WHERE s.dateSellable = :dateSellable"), @NamedQuery(name = "SongRingtones.findByTakedown", query = "SELECT s FROM SongRingtones s WHERE s.takedown = :takedown"), @NamedQuery(name = "SongRingtones.findByAvailable", query = "SELECT s FROM SongRingtones s WHERE s.available = :available"), @NamedQuery(name = "SongRingtones.findBySpcode", query = "SELECT s FROM SongRingtones s WHERE s.spcode = :spcode"), @NamedQuery(name = "SongRingtones.findByServicecode", query = "SELECT s FROM SongRingtones s WHERE s.servicecode = :servicecode")})
public class SongRingtones implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "ringtoneId")
    private Integer ringtoneId;
    @Basic(optional = false)
    @Column(name = "name")
    private String name;
    @Column(name = "isrc")
    private String isrc;
    @Basic(optional = false)
    @Column(name = "dateReceived")
    @Temporal(TemporalType.TIMESTAMP)
    private Date dateReceived;
    @Column(name = "duration")
    private Integer duration;
    @Column(name = "copyright")
    private String copyright;
    @Column(name = "sellable")
    private Character sellable;
    @Column(name = "dateSellable")
    @Temporal(TemporalType.DATE)
    private Date dateSellable;
    @Basic(optional = false)
    @Column(name = "takedown")
    private char takedown;
    @Basic(optional = false)
    @Column(name = "available")
    private char available;
    @Basic(optional = false)
    @Column(name = "spcode")
    private String spcode;
    @Column(name = "servicecode")
    private String servicecode;

    public SongRingtones() {
    }

    public SongRingtones(Integer ringtoneId) {
        this.ringtoneId = ringtoneId;
    }

    public SongRingtones(Integer ringtoneId, String name, Date dateReceived, char takedown, char available, String spcode) {
        this.ringtoneId = ringtoneId;
        this.name = name;
        this.dateReceived = dateReceived;
        this.takedown = takedown;
        this.available = available;
        this.spcode = spcode;
    }

    public Integer getRingtoneId() {
        return ringtoneId;
    }

    public void setRingtoneId(Integer ringtoneId) {
        this.ringtoneId = ringtoneId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getIsrc() {
        return isrc;
    }

    public void setIsrc(String isrc) {
        this.isrc = isrc;
    }

    public Date getDateReceived() {
        return dateReceived;
    }

    public void setDateReceived(Date dateReceived) {
        this.dateReceived = dateReceived;
    }

    public Integer getDuration() {
        return duration;
    }

    public void setDuration(Integer duration) {
        this.duration = duration;
    }

    public String getCopyright() {
        return copyright;
    }

    public void setCopyright(String copyright) {
        this.copyright = copyright;
    }

    public Character getSellable() {
        return sellable;
    }

    public void setSellable(Character sellable) {
        this.sellable = sellable;
    }

    public Date getDateSellable() {
        return dateSellable;
    }

    public void setDateSellable(Date dateSellable) {
        this.dateSellable = dateSellable;
    }

    public char getTakedown() {
        return takedown;
    }

    public void setTakedown(char takedown) {
        this.takedown = takedown;
    }

    public char getAvailable() {
        return available;
    }

    public void setAvailable(char available) {
        this.available = available;
    }

    public String getSpcode() {
        return spcode;
    }

    public void setSpcode(String spcode) {
        this.spcode = spcode;
    }

    public String getServicecode() {
        return servicecode;
    }

    public void setServicecode(String servicecode) {
        this.servicecode = servicecode;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (ringtoneId != null ? ringtoneId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof SongRingtones)) {
            return false;
        }
        SongRingtones other = (SongRingtones) object;
        if ((this.ringtoneId == null && other.ringtoneId != null) || (this.ringtoneId != null && !this.ringtoneId.equals(other.ringtoneId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.dp.vo.SongRingtones[ringtoneId=" + ringtoneId + "]";
    }

}
